Data flow graphs comprise a plurality of nodes that define how a query is to be executed. For a given data flow graph and its nodes, rules can be used to decide various aspects of how the query is applied in an underlying database of a multi-level database management system. Applications that access the database generally provide higher level instructions that are converted to a query language such as SQL by a calculation engine or other intervening semantic layer of the database management system. The plurality of rules are generally applied globally and therefore may not provide a most optimized query plan for a specific query or set of queries generated by an application.